package com.itcoon.cloud.framework.mybatis.method;

public enum SqlMethod {
    GET_REAL_BY_ID("getRealById", "根据ID查询数据项（包括逻辑删除）", "SELECT %s FROM %s WHERE %s=#{%s}"),
    LIST_REAL_BY_IDS("listRealByIds", "根据ID查询数据项列表（包括逻辑删除）", "<script> SELECT %s FROM %s WHERE %s IN (%s)</script>"),
    LIST_REAL("listReal", "查询所有数据项列表（包括逻辑删除）", "SELECT %s FROM %s"),
    GET_BY("getBy", "根据条件查询", "SELECT %s FROM %s %s"),
    ;

    private final String method;
    private final String desc;
    private final String sql;

    SqlMethod(String method, String desc, String sql) {
        this.method = method;
        this.desc = desc;
        this.sql = sql;
    }

    public String getMethod() {
        return method;
    }

    public String getDesc() {
        return desc;
    }

    public String getSql() {
        return sql;
    }
}
